<?php
/**
* Authorization item form configuration file.
*
* @author Christoffer Niska <cniska@live.com>
* @copyright Copyright &copy; 2010 Christoffer Niska
*/
$config = array(
    'elements'=>array(
        'name'=>array(
            'type'=>'text',
            'maxlength'=>64,
        ),
        'description'=>array(
            'type'=>'text',
        ),
    ),

    'buttons'=>array(
        'submit'=>array(
            'type'=>'submit',
            'label'=>Yii::t('authItem', 'Submit'),
        ),
    ),
);

// Enable business rules if needed
if( Yii::app()->getModule('authorization')->enableBizRule===true )
{
	$config['elements']['bizRule'] = array(
    	'type'=>'text',
    );

	// Also enable data for business rules if needed
	if( Yii::app()->getModule('authorization')->enableBizRuleData===true )
	{
	    $config['elements']['data'] = array(
	        'type'=>'text',
	    );
	}
}

// Return the form configuration
return $config;